home *** CD-ROM | disk | FTP | other *** search
/ Ultra Gameplayers 101 / Ultra Game Players Magazine, No. 101 - September 1997 (Imagine Publishing, Inc.)(1997).iso / pc / new_ugp.dxr / 00345.ls < prev    next >
Encoding:
Text File  |  1997-07-10  |  1.0 KB  |  26 lines

  1. on CompareScripts scriptNum1, scriptNum2
  2.   set script1 to the scriptText of member scriptNum1 of castLib "utilities"
  3.   set script2 to the scriptText of member scriptNum2 of castLib "utilities"
  4.   if script1 = script2 then
  5.     put "Script" && scriptNum1 && "and script" && scriptNum2 && "are the same"
  6.   else
  7.     set lineCount1 to the number of lines in script1
  8.     set lineCount2 to the number of lines in script2
  9.     if lineCount1 <> lineCount2 then
  10.       put "Script" && scriptNum1 & ":" && lineCount1 && "lines -- Script" && scriptNum2 & ":" && lineCount2 && "lines"
  11.     end if
  12.     put "Script" && scriptNum1
  13.     repeat with lineNum = 1 to lineCount1
  14.       if offset(line lineNum of script1, script2) = 0 then
  15.         put "    line" && lineNum && ":" && line lineNum of script1
  16.       end if
  17.     end repeat
  18.     put "Script" && scriptNum2
  19.     repeat with lineNum = 1 to lineCount2
  20.       if offset(line lineNum of script2, script1) = 0 then
  21.         put "    line" && lineNum && ":" && line lineNum of script2
  22.       end if
  23.     end repeat
  24.   end if
  25. end
  26.